﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section5
{
    public class Example10
    {
        public Example10()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            V.MatrixSquare A = new V.MatrixSquare(3);

            A[0, 0] = 1.0;
            A[0, 1] = 1.0;
            A[0, 2] = 1.0;
            A[1, 0] = 1.0;
            A[1, 1] = 0.0;
            A[1, 2] = 1.0;
            A[2, 0] = 1.0;
            A[2, 1] = 0.0;
            A[2, 2] = 2.0;

            V.MatrixSquare Ap = new V.MatrixSquare(3);

            Ap[0, 0] = 1.0;
            Ap[0, 1] = 1.0;
            Ap[0, 2] = 1.0;
            Ap[1, 0] = 2.0;
            Ap[1, 1] = 1.0;
            Ap[1, 2] = 1.0;
            Ap[2, 0] = 1.0;
            Ap[2, 1] = 1.0;
            Ap[2, 2] = 2.0;

            double d = 1.0 * A.Determinant + 1.0 * Ap.Determinant;

            result += d.ToString() + "\r\n";
        }
    }
}

// -2
